package chapter04

/**
 *
 * @author cdhuangchao3
 * @date 2023/6/4 4:42 PM
 */
object Test01_IfElse {

  def main(args: Array[String]): Unit = {

    val age = 20;
    val result = if (age < 10) {
      println("童年")
    } else {
      println("其他")
    }
    val result2: Unit = if (age < 10) {
      println("童年")
    } else {
      println("其他")
    }
    println(result )
    println(result2)
//    val r3 = age > 10 ? 3 : 4 // error
  }

}
